package 晚自习练习;

import java.util.Random;

public class 键盘录入求和打印 {
    public static void main(String[] args) {

        Random r = new Random();

        int[] arr = new int[6];

        int sum = 0;

        for (int j = 0; j < arr.length; j++) {

            arr[j] = r.nextInt(101);

            sum += arr[j];

        }
        System.out.println("这个数组的和是："+sum);
    }
}



